package com.maychat.service;

import com.maychat.exception.BusinessException;
import com.maychat.pojo.UserContact;
import com.maychat.pojo.UserInfo;
import com.maychat.pojo.RowsWithTotal;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;
import java.util.Map;

public interface UserInfoService {

//    void insertUserInfo(UserInfo userInfo);
//
//    RowsWithTotal<UserInfo> selectUserInfos(Integer page, Integer pageSize, UserInfo userInfo);
//
//    void updateUserInfoById(UserInfo userInfo);

    void register(String email, String password, String nickname) throws BusinessException;

    Map<String, Object> login(String email, String password) throws BusinessException;

    List<UserInfo> selectUserInfosByUserContact(UserContact userContact);

    UserInfo selectUserInfoById(String userId);

    void updateUserInfoById(UserInfo userInfo, MultipartFile avatarSmall, MultipartFile avatarFull) throws IOException;

    void updatePassword(String userId, String oldPassword, String newPassword) throws BusinessException;

    RowsWithTotal<UserInfo> adminSelectUsers(UserInfo userInfo, Integer page, Integer pageSize);

    void updateUserStatusById(String userId, Integer status) throws BusinessException;

    void kick(String userId);
}
